Skip to content

Conversation

@github-actions
Copy link
Contributor

@github-actions github-actions bot commented Nov 6, 2025

🤖 Automated fix by Claude Code

Related Issue: #13
Executed by: @DavidWells


If additional fixes are needed: Mention @ claude in a comment on this PR.

resolves #13


Automated PR by Claude Code Action - Run #19148994240

- Convert test files to use uvu test runner and assertions
- Update package.json to use uvu instead of ava
- Update test script pattern to match uvu requirements
- All test syntax converted (ava -> uvu, t.* -> assert.*)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: David Wells <DavidWells@users.noreply.github.com>
@github-actions
Copy link
Contributor Author

github-actions bot commented Nov 6, 2025

💬 Claude Code execution complete

📊 Execution Info: Pull Request #14 | React (271 files) | @DavidWells
🌿 Branch: claude/issue-13-20251106-2031master
ℹ️ Action Run: https://github.com/DavidWells/packages/actions/runs/19151444167

@github-actions github-actions bot mentioned this pull request Nov 6, 2025
@DavidWells
Copy link
Owner

Please add JSdoc blocks to all publicly facing functions in the git ./packages/util-git-info directory

And setup typescript to check javascript file JSdocs and have it emit our types to a gitignored ./types directory. We will be publishing the types with the package

thanks @claude

@github-actions
Copy link
Contributor Author

github-actions bot commented Nov 6, 2025

Claude finished @DavidWells's task —— View job


✅ JSDoc and TypeScript Setup Complete

Tasks Completed:

  • Read repository guidelines (CLAUDE.md)
  • Explore the package structure and identify public API
  • Add JSDoc blocks to publicly facing functions:
    • gitDetails in src/git/getDetails.js
    • getCommit in src/git/commits/getCommit.js
    • getFirstCommit, getFirstCommitHash in src/git/commits/getFirstCommit.js (already had JSDoc)
    • getLastCommit, getCurrentRevision, getCurrentCommitMessage in src/git/commits/getLastCommit.js
    • getAllCommits in src/git/commits/getAllCommits.js
    • getGitFiles, getGitFilesRelative in src/git/getGitFiles.js (already had JSDoc)
    • LocalGit class and methods in src/localGit.js
  • Setup TypeScript configuration for JS type checking
  • Update package.json with TypeScript dependencies
  • Add /types to .gitignore
  • Test TypeScript type checking and emission
  • Commit and push changes

Summary

I've successfully added comprehensive JSDoc documentation to all publicly facing functions in the packages/util-git-info directory and configured TypeScript for type checking and type generation.

What was done:

JSDoc Documentation Added:

  • gitDetails() - Main function to get git details between two refs
  • getCommit(hash) - Get specific commit information by hash
  • getFirstCommit() - Get the first commit in the repository
  • getLastCommit(), getCurrentRevision(), getCurrentCommitMessage() - Get current commit info
  • getAllCommits() - Get all commits in the repository
  • LocalGit class and all its methods - Internal git operations class

TypeScript Configuration:

  • Created tsconfig.json configured to:
    • Enable type checking for JavaScript files (checkJs: true)
    • Generate type declarations from JSDoc comments
    • Emit types to ./types directory
    • Use non-strict mode to avoid errors on existing code
  • Added types field in package.json pointing to types/index.d.ts
  • Added types directory to package.json files array for publishing
  • Created comprehensive type definitions in src/types.js including:
    • CommitInfo - Commit metadata structure
    • GitDetails - Main git details return type
    • FileMatchResult - File matching result structure
    • AuthorInfo and CommitterInfo - Commit attribution types

NPM Scripts:

  • types:check - Run TypeScript type checking without emitting files
  • types:build - Generate type definition files to ./types directory
  • prepublishOnly - Automatically builds types before publishing

Dependencies:

  • Added typescript@^5.7.2 as dev dependency
  • Added @types/node@^22.10.1 for Node.js type definitions

Gitignore:

  • Added types/ directory to .gitignore so generated types aren't committed
  • Types will be generated fresh during npm publish

The types are successfully generating and will be published with the package, providing full TypeScript IntelliSense support for users of this library!

--- |

- Added JSDoc documentation to all publicly facing functions
- Created TypeScript configuration for type checking and emission
- Added TypeScript and @types/node as dev dependencies
- Types are generated to ./types directory (gitignored)
- Added npm scripts: types:check and types:build
- Types will be automatically built before publishing
- Package.json now includes types field pointing to generated types

Co-authored-by: David Wells <DavidWells@users.noreply.github.com>
@github-actions github-actions bot added auto-generated Automatically generated content ci-cd CI/CD improvements claude-code Items created or modified by Claude Code labels Nov 6, 2025
@DavidWells DavidWells merged commit 86cbd48 into master Nov 6, 2025
2 checks passed
@DavidWells DavidWells deleted the claude/issue-13-20251106-2031 branch November 6, 2025 22:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

auto-generated Automatically generated content ci-cd CI/CD improvements claude-code Items created or modified by Claude Code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Update git utils package

2 participants